package com.oms.constant;

import com.baomidou.mybatisplus.core.enums.IEnum;

/**
 * @Author zhanghailong
 * @Description TODO
 * @Date 14:40 2020/3/28
 */
public enum FlagTypeEnum implements IEnum<Integer> {
    /**
     * 是
     */
    YES(1),

    /**
     * 否
     */
    NO(0);
    private Integer value;

    private FlagTypeEnum(Integer value){
        this.value = value;
    }

    @Override
    public Integer getValue() {
        return value;
    }


    @Override
    public String toString() {
        StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
        for (StackTraceElement e : stackTrace) {
            if(e.getClassName().startsWith("springfox")){
                return "可选值:YES:是，NO:否";
            }
        }
        return super.toString();
    }
}
